Adwaita: more usefull headerbar related functions
authorLapo Calamandrei <calamandrei@gmail.com>
Wed, 3 Sep 2014 17:41:50 +0000 (19:41 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Wed, 3 Sep 2014 17:41:50 +0000 (19:41 +0200)
gtk/resources/theme/Adwaita/_drawing.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 1ee03d978e3347bc253127491c8f3b1383e165a6..371af4addff843921ff234f39d98d61ad8ab3006 100644 (file)
@@ -3,7 +3,7 @@
 // generic drawing of more complex things
 
 @function _widget_edge($c:$borders_edge) {
-  // outer highlight "used" on most widgets
+// outer highlight "used" on most widgets
   @return 0 1px $c;
 }
 
@@ -94,8 +94,9 @@
 
 // buttons
 
-@function _border_color ($c) { @return darken($c,25%); } // colored buttons want the
-                                                         // border form the base color
+@function _border_color ($c) { @return darken($c,25%); } // colored buttons want
+                                                         // the border form the
+                                                         // base color
 
 @function _text_shadow_color ($tc:$fg_color, $bg:$bg_color) {
 //
                                              lighten($selected_bg_color,6%));
 }
 
-@function headerbar_gradient($c) {
-  @return linear-gradient(to bottom, lighten($c,4%), $c);
+@function headerbar_gradient($c, $tc:lighten($c,4%)) {
+//
+// headerbar gradient helper function
+//
+// $c:  base color
+// $tc: top color
+//
+  @return linear-gradient(to bottom, $tc, $c);
 }
 
-@mixin headerbar_fill($c:$bg_color, $hc:$top_hilight) {
-  //
-  // headerbar fill
-  //
-  // $c:  base color
-  // $hc: top highlight color
-  // 
-  background-image: headerbar_gradient($c);
-  box-shadow: inset 0 -1px mix($borders_color, $c, 30%), // bottom shade
+@mixin headerbar_fill($c:$bg_color, $tc:lighten($c,4%), $hc:$top_hilight) {
+//
+// headerbar fill
+//
+// $c:  base color
+// $tc: top color
+// $hc: top highlight color
+// 
+  background-image: headerbar_gradient($c, $tc);
+  box-shadow: inset 0 -1px mix(_border_color($c), $c, 30%), // bottom shade
               inset 0 1px $hc; // top highlight
 
 }
index aae82b40fa441c075d7048d0bd09f391cb7a060c..29cf305ecb3ae9e2f59736bbcb7d144af65f96de 100644 (file)
@@ -1179,7 +1179,7 @@ GtkComboBox {
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #434a4a, #393f3f);
-  box-shadow: inset 0 -1px #303535, inset 0 1px rgba(238, 238, 236, 0.1); }
+  box-shadow: inset 0 -1px #272c2c, inset 0 1px rgba(238, 238, 236, 0.1); }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #1e2222;
index b78b48c7cc83fd0007e801e97e6f6dd6b71b3729..0f46d9558850ad6deed5e234d59226dcb86da518 100644 (file)
@@ -1171,7 +1171,7 @@ GtkComboBox {
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #f7f7f7, #ededed);
-  box-shadow: inset 0 -1px #d6d6d6, inset 0 1px white; }
+  box-shadow: inset 0 -1px #d9d9d9, inset 0 1px white; }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #a8a8a8;